package com.jiangxjsy.core.common;

import com.jiangxjsy.core.constant.UserStatusConstant;
import lombok.Getter;

/**
 * wukong-crm-master
 * 蒋胜宇
 * 2025/6/4 22:43
 */

@Getter
public enum UserStatus {
    DISABLE(UserStatusConstant.DISABLE),
    NORMAL(UserStatusConstant.NORMAL),
    NOT_ACTIVE(UserStatusConstant.NOT_ACTIVE);

    private final Integer status;

    UserStatus(Integer status) {
        this.status = status;
    }

    public static UserStatus valueOf(Integer status) {
        for (UserStatus value : values()) {
            if (value.status.equals(status)) {
                return value;
            }
        }
        return DISABLE;
    }
}
